package com.woniuxy.hotel.setting.util;

import com.itextpdf.text.Font;
import com.itextpdf.tool.xml.XMLWorkerFontProvider;

/**
 * @Auther: desk-----xuzhiliang
 * @Date: 2019/8/9 17:16
 * @Description:
 */
public class FontProviderImp extends XMLWorkerFontProvider {
        public FontProviderImp() {
            super(null, null);
        }

        @Override
        public Font getFont(final String fontname, String encoding, float size,
                            final int style) {

            String fntname = fontname;
            if (fntname == null) {
                fntname = "宋体";
            }
            return super.getFont(fntname, encoding, size, style);
        }

    }


